<script type="text/javascript" src="/static/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/res/layui/layui.js"></script>
<script type="text/javascript" src="/static/admin/addons/builder/js/notify.js"></script>
<script type="text/javascript" src="/static/admin/js/wangEditor.js"></script>
<script type="text/javascript" src="/static/admin/addons/builder/js/sundry.js"></script>
<script>
    // 加载layui核心模块
    layui.config({
        base: '/static/res/'
    }).use(['index']);

    // 监听ESC关闭全屏
    document.addEventListener("webkitfullscreenchange", function (){
        if (!document.webkitIsFullScreen) {
            $(".screen").addClass('layui-icon-screen-full').removeClass('layui-icon-screen-restore');
        }
    });
</script>

{if request()->rule()->getName() != 'index/index' && !empty($definePath)}
<script>
    // 加载框架核心模块
    layui.extend({
        core: "{$definePath}core/core",
        listen: "{$definePath}core/listen",
        wangEditor: "{$definePath}core/wangEditor",
        gallery: "{/}/static/admin/addons/gallery/js/gallery",
    }).use(['core', 'listen', 'gallery', 'wangEditor'], function () {
        layui.core.linkageInit(); //select联动模块
        layui.core.timeInit(); //格式化time模块
        layui.listen.init(); //初始化各种监听事件
        layui.gallery.init(); //初始化图库
        layui.wangEditor.init(); //初始化wangEditor
    });
</script>
{/if}
